package main

import (
	config "ShortLink/Config"
	"ShortLink/Core/LogHelper"
	mysql "ShortLink/Core/Mysql"
	redis "ShortLink/Core/Redis"
	router "ShortLink/Router"
)

func main() {
	LogHelper.Init()
	config.Init()
	mysql.Init()
	redis.Init()
	//link := new(entity.LinkInfo)
	//link.CreateTime = time.Now()
	//link.ExpirationTime = time.Now().AddDate(1, 0, 0)
	//link.Segment = Random.RandomString(5)
	//link.JumpLink = "https://baidu.com"
	//repository.Add(link)

	// var link = repository.QueryBySegment("cARhb")
	// fmt.Println(link)
	// logInfo := new(LogHelper.LogInfo)
	// logInfo.Title = "测试"
	// logInfo.Data = link
	// logInfo.Msg = "dev"
	// LogHelper.Info(logInfo)
	// LogHelper.Info("1234565")
	// LogHelper.Info(123456)

	c := router.Router()
	c.Run(":8080")
}
